from typing import Optional, Literal, List, Dict, Any
from pydantic import BaseModel, Field


class ClientAttachment(BaseModel):
    """Client attachment model for file uploads or other attachments"""
    type: str
    name: str
    content: str


class ToolCall(BaseModel):
    """Tool call model for function calling"""
    id: str
    name: str
    arguments: Dict[str, Any]


class RAGQueryRequest(BaseModel):
    """Request model for RAG queries"""
    query: str
    similarity_top_k: Optional[int] = 3
    system_prompt: Optional[str] = None
    stream: Optional[bool] = True


class RAGQueryResponse(BaseModel):
    """Response model for RAG queries"""
    answer: str
    context: str
    sources: List[str]


class DocumentUploadResponse(BaseModel):
    """Response model for document upload"""
    success: bool
    message: str
    file_paths: List[str]